package com.shell.qq;

import android.os.Bundle;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;

import java.io.IOException;

//以XML文件形式存放注册信息的注册成功的页面
public class RegsuccActivity extends AppCompatActivity {

    private TextView textView2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_regsucc);
        init();
    }

    public void init() {
        textView2 = findViewById(R.id.textView2);
    }
    @Override
    protected void onResume() {
        super.onResume();
        UserInfo userInfo=new UserInfo(new User());
//        userInfo.getUserXMLDate(this);//读取XML文件信息
        try {
            userInfo.getUserDataWithFile(this);//从文件读取数据（内部存储）
        } catch (IOException e) {
            e.printStackTrace();
        }
        textView2.setText(userInfo.getUser().toString());
    }
}